#ifndef KLUNARDATEEDIT_H
#define KLUNARDATEEDIT_H

#include "../screencapsdk_global.h"
#include <QObject>
#include <QWidget>
#include <QDateEdit>

namespace kdk
{
class KLunarDateEditPrivate;

/**
 *  @defgroup KLunarDateEdit
 *  @since 2.5
 */

class SCREENCAPSDK_EXPORT KLunarDateEdit : public QWidget
{
    Q_OBJECT
public:
    explicit KLunarDateEdit(QWidget *parent = nullptr);

    /**
     * @brief 是否显示农历
     * @param showLunar：true显示，false不显示
     */
    void setShowLunar(bool showLunar);

    /**
     * @brief 获取控件中的DateEdit控件
     * @return
     */
    QDateTimeEdit* getDateEdit();

protected:
    void resizeEvent(QResizeEvent* event);

signals:
    void dateChanged(QDate);

private slots:
    void slotPaletteChanged();
    void slotDateChanged(QDate date);
    void slotClicked();

private:
    Q_DECLARE_PRIVATE(KLunarDateEdit)
    KLunarDateEditPrivate* const d_ptr;
};
}

#endif // KLUNARDATEEDIT_H
